home *** CD-ROM | disk | FTP | other *** search
/ Sprite 1984 - 1993 / Sprite 1984 - 1993.iso / src / cmds / g++1.68k / utils.mk < prev    next >
Makefile  |  1991-05-23  |  2KB  |  66 lines

  1. #
  2. # This Makefile is a special one for the cc1 program (the main portion of
  3. # the GNU C compiler).  The purpose of this Makefile is to generate
  4. # executable copies of several utility programs, which are then used
  5. # to generate source files for the compiler from a description of the
  6. # machine for which the compiler is to generate code.  This Makefile
  7. # must be separate from the main Makefile, and must be processed in
  8. # a separate invocation of Pmake, because its target machine must be
  9. # the machine on which we're executing now, not the machine on which
  10. # the compiler is to execute.
  11. #
  12. # $Header: /sprite/src/cmds/g++1.68k/RCS/utils.mk,v 1.2 91/05/23 18:10:41 kupfer Exp $
  13. #
  14.  
  15. MACHINES     = $(TM)
  16. SRCDIR        ?= ../cc/dist
  17. TM        ?= sun3
  18. CC        = cc
  19. LIBS        ?=
  20. XCFLAGS        ?=
  21.  
  22. .PATH.h        : ../cc/sprite $(SRCDIR) /sprite/lib/include \
  23.             /sprite/lib/include/$(TM).md
  24.  
  25. #include    <tm.mk>
  26. CFLAGS         = -g -O $(TMCFLAGS) -I. $(.INCLUDES) $(XCFLAGS)
  27.  
  28. all        : $(TM).md/genconfig $(TM).md/genflags $(TM).md/gencodes \
  29.             $(TM).md/genemit $(TM).md/genrecog \
  30.             $(TM).md/genextract $(TM).md/genpeep \
  31.             $(TM).md/genoutput
  32. #
  33. # The targets below are for a bunch of utility programs used to generate
  34. # C files for machine-dependent aspects of the compiler.  Things are a
  35. # little tricky here:  these programs have to be generated to run on
  36. # the current machine ($MACHINE).
  37. #
  38.  
  39. MAKEGEN:    .USE $(TM).md/rtl.o $(TM).md/obstack.o $(LIBS)
  40.     $(RM) -f $(.TARGET)
  41.     $(CC) $(CFLAGS) -o $(.TARGET) $(.ALLSRC:N*.h:N*.def)
  42.  
  43. $(TM).md/genconfig        : $(SRCDIR)/genconfig.c MAKEGEN
  44. $(TM).md/genflags        : $(SRCDIR)/genflags.c MAKEGEN
  45. $(TM).md/gencodes        : $(SRCDIR)/gencodes.c MAKEGEN
  46. $(TM).md/genemit        : $(SRCDIR)/genemit.c MAKEGEN
  47. $(TM).md/genrecog        : $(SRCDIR)/genrecog.c MAKEGEN
  48. $(TM).md/genextract        : $(SRCDIR)/genextract.c MAKEGEN
  49. $(TM).md/genpeep        : $(SRCDIR)/genpeep.c MAKEGEN
  50. $(TM).md/genoutput        : $(SRCDIR)/genoutput.c MAKEGEN
  51.  
  52. #
  53. # Targets to generate the .o files that must be linked with the files
  54. # above.
  55.  
  56. MAKEOBJ:    .USE
  57.     $(RM) -f $(.TARGET)
  58.     $(CC) $(CFLAGS) -c -o $(.TARGET) $(.ALLSRC:N*.h:N*.def)
  59.  
  60. $(TM).md/obstack.o        : obstack.c MAKEOBJ
  61. $(TM).md/rtl.o            : rtl.c MAKEOBJ
  62.  
  63. #if exists($(TM).md/dependencies.mk)
  64. #include    "$(TM).md/dependencies.mk"
  65. #endif
  66.